<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ page isELIgnored="false"%>

<form id="backForm" method="post"
	action="${pageContext.request.contextPath}/system/tsysUserList.do"
	onsubmit="return navTabSearch(this);">
	<input type="hidden" name="page.pageSize" value="${page.pageSize}" />
	<input type="hidden" id="pageNo" name="page.pageNo"
		value="${page.pageNo}" /> <input type="hidden" name="orderField"
		value="${orderField}" /> <input type="hidden" name="pageNum"
		value="1" /> <input type="hidden" name="numPerPage"
		value="${page.pageSize}" /> <input type="hidden" name="id" id="id"
		value="${id}" /> <input type="hidden" name="queryStr" id="queryStr"
		value="queryStr" />
</form>
<script type="text/javascript">
	function changepassword() {
		var password = $("#password").val();
		var newpassword = $("#newpassword").val();
		$.ajax({
			type : "get",
			url : "${pageContext.request.contextPath}/test/changePassword.do",
			data : "password=" + password + "&newpassword=" + newpassword,
			beforeSend : function(XMLHttpRequest) {
				//ShowLoading();
			},
			success : function(data, textStatus) {
				alert(data);
			},
			complete : function(XMLHttpRequest, textStatus) {
				//HideLoading();
			},
			error : function() {
				//请求出错处理
			}
		});
	}
</script>
<div class="pageContent">
	<form method="post"
		action="${pageContext.request.contextPath}/system/changePassword.do"
		id="addForm" class="editForm required-validate"
		onsubmit="return validateCallback(this, dialogAjaxDone);">
		<input type="hidden" id="flag" name="flag" value="add" />
		<div class="pageFormContent" layoutH="56">
			<p>
				<label>原密码：</label> <input id="password" name="password" type="text"
					value="" />
			</p>
			<p>
				<label>新密码：</label> <input id="newpassword" name="newpassword"
					type="text" value="" />
			</p>
			<p>
				<label>确认新密码：</label> <input id="newpassword2" name="newpassword2"
					type="text" value="" />
			</p>
		</div>

		<div class="formBar">
			<ul>
				<!--<li><a class="buttonActive" href="javascript:;"><span>保存</span></a></li>-->
				<li><div class="buttonActive">
						<div class="buttonContent">
							<button type="button" onClick="return changepassword();">确定</button>
						</div>
					</div></li>
				<li>
					<div class="buttonActive">
						<div class="buttonContent">
							<button type="button" class="close">取消</button>
						</div>
					</div>
				</li>
			</ul>
		</div>
	</form>
</div>

<script type="text/javascript">
	function add() {
		$("#addForm").attr("action",
				"${pageContext.request.contextPath}/test/changePassword.do");
		$("#addForm").submit();
	}

	function back() {
		$("#backForm").attr("action",
				"${pageContext.request.contextPath}/test/changePassword.do");
		$("#backForm").submit();
	}
</script>
